home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
EDIT_UTL
/
TRIVED09
/
TRIVED.DOC
< prev
next >
Wrap
Text File
|
1995-04-23
|
4KB
|
169 lines
trived -- a trivial editor
Russell Schulz
russell@alpha.ersys.edmonton.ab.ca (950423)
Shortcomings
------------
see the start of trived.pas
Credits
-------
Bill Joy, for the (incredibly more powerful) vi editor
Usage
-----
usage: trived [options] filename
options:
-h/--help for permanent on-screen help
-m/--minutes number-of-minutes-to-run
-d/--dir directory from where user may read files
-p/--port 1 for COM1, 2 for COM2
-f/--fossil-port 0 for COM1, 1 for COM2
-t/--trusted modem user may read all files
-l/--lines number-of-lines
-c/--columns number-of-columns
--colors low-color,high-color (e.g., 3,15)
-f and -p are exactly the same except for
-f starting at 0 and -p starting at 1
eg: (from waffle) trived -p %d -m %O filename
colors can be specified with a comma (,) or underscore (_) or slash (/)
between them
the COLORS environment will be used if nothing else is specified
Redeeming features
------------------
- free (I just had to get it out of my system)
- source code included
- with `:r filename' does an automatic uuencode of non-ASCII files
- works over a serial port
- over serial port, by default is restricted to current file only,
or with command-line options to one directory only
- with command-line option, 2 lines of help always on-screen
Implemented
-----------
(see also trived.pas(editfile) for the final word!)
? help (one-line, or full-screen if `-h' used)
z help (always full-screen)
u simple undo
numbers -- build a counter for the next command
e.g., 4j goes down 4 lines; 10x deletes 10 characters
j, ^N, ^J : down lines
^M (Return), + : down lines, start at non-whitespace
k, ^P, ^K : up lines
- : up lines, start at non-whitespace
l, space, ^U : right characters
h, ^H, backspace : left characters
^L : refresh screen
x : delete characters
X : delete characters left
i : insert
I : insert, starting at front of line
a : append
A : append, starting at end of line
s : split line at cursor
c, J : combine this line and next
o : open new line below (and insert)
O : open new line above (and insert)
p : paste buffered line after
P : paste buffered line before
D : delete line (place in buffer)
Y : yank line to buffer
G : goto line (without a counter, defaults to end of file)
^F, > : forward page
^B, < : back page
H : highest (top) line on screen
M : middle line on screen
L : lowest (bottom) line on screen
w : write file
^R : reread file
^G : display file information
^E : scroll screen up, but stay on same line
^Y : scroll screen down, but stay on same line
r : replace 1 character
R : replace until Esc
~ : change case (UPPER <-> lower)
: : colon commands (see next section)
/ : begin searching
n : search next
N : search previous
| : go to column (defaults to first column without a counter)
$ : go to last column
^ : go to first nonblank column
0 : if there is a counter, set counter to counter*10, else go to first column
q, Q : quit
Colon Commands
--------------
(see also trived.pas(coloncommands) for the final word!)
:h :help
help
:q :quit
quit (also, :q! and :quit! to discard changes)
:f :file
display file information
:w :write
write to disk (can supply filename)
:e :edit
edit (can supply filename) (also, :e! and :edit! to discard changes)
:x
exit (save if changed)
:<number>
go to that line
:r :read
read in a file, uuencoding if it is non-ASCII